package Games.PumpGame.Entities
{
	import Framework.BaseEntity;
	import Framework.BaseGui;
	import Games.PumpGame.Gui.RoomGui;
	/**
	 * ...
	 * @author Menno
	 */
	public class Room extends BaseEntity
	{	
		private var roomWidth:uint;
		private var	roomLength:uint;
		
		private var roomLocX:uint;
		private var roomLocY:uint;
		
		public function Room(width:uint, length:uint, x:uint, y:uint, guiObject:RoomGui = null) 
		{				
			roomWidth = width;
			roomLength = length;
			roomLocX = x;
			roomLocY = y;
			
			guiObject.roomWidth = roomWidth;
			guiObject.roomLength = roomLength;
			guiObject.roomLocX = roomLocX;
			guiObject.roomLocY = roomLocY;
			
			super(guiObject);
			
			createCollisionWalls();
		}
		
		public override function update():void
		{
			
		}
		
		private function createCollisionWalls():void
		{
			new Wall(roomLocX, roomLocY, 0, roomWidth);
			new Wall(roomLocX + roomWidth, roomLocX, roomLength, 0);
			new Wall(roomLocX, roomLocY + roomLength, 0, roomWidth);
			new Wall(roomLocX, roomLocY, roomLength, 0);
		}
	}
	
}